package com.hedl.practice.diyJava.gather.study_map.practice;

import com.hedl.practice.diyJava.gather.study_map.tmp.Student;
import com.hedl.practice.diyJava.gather.study_map.tmp.Students;

import java.util.Arrays;
import java.util.List;

public class Maim {
    public static void main(String[] args) {
        List<Student> list = Arrays.asList(
                new Student("Bob",78),
                new Student("Alice",85),
                new Student("Brush",66),
                new Student("Newton",99)
        );

        Students holder = new Students(list);
        System.out.println(holder.getScore("Bob") == 78 ? "测试成功" : "测试失败");
        System.out.println(holder.getScore("Alice") == 85 ? "测试成功" : "测试失败");
        System.out.println(holder.getScore("Tom") == -1 ? "测试成功" : "测试失败");
    }
}
